'use strict'; //严格模式

// mvc框架
const express = require('express');
const path = require('path');


// 创建路由对象
const teachRouter = express.Router();

// 引入控制器

const teachCtrl=require(path.join(__dirname,"../controllers/teachController.js"));

// 路由对应的数据控制器


teachRouter.get('/teach_add',teachCtrl.teachAdd);

// post数据提交
teachRouter.post('/teach_add',teachCtrl.teachAddData);

// 教师端的列表以及分页

teachRouter.get('/teach_list',teachCtrl.teachList);

// 教师端的编辑页

teachRouter.get('/teach_edit/:teach_id',teachCtrl.teachEdit);

// 教师端修改数据界面

teachRouter.post('/teach_edit/:teach_id',teachCtrl.teachEditAdd);

teachRouter.get('/teach_delete/:teach_id',teachCtrl.teachDelte);



module.exports=teachRouter;